package com.example.myProxy;

import java.lang.reflect.InvocationHandler;
import java.lang.reflect.Method;
import java.util.ArrayList;


public class MyProxy implements InvocationHandler {

    @Override
    public Object invoke(Object proxy, Method method, Object[] args) throws Throwable {
        String name = method.getName();
        if("testa".equals(name)){
            return new ArrayList<>();
        }else {
            return "三生三世";
        }
    }
}
